1. Field of the Invention
This invention relates to computer process messaging, and more particularly to managing messages in a clustered environment.
2. Description of the Related Art
As network functionality increases, it is becoming increasingly more important for systems to allow applications and application components to be distributed across networks (e.g., on multiple application servers). For applications and application components to be effectively distributed, various distributed parts of applications and application components (e.g., nodes) need to be able to communicate with each other. Nodes may communicate with each other using messaging to exchange information. The information may be sent and received by nodes using a predetermined message format and a destination address for the message. A node may be a software component or process that runs on a common computer or different computers connected by a network or networks. A node may be a message producer and/or a consumer. The predetermined message format may include a message header for message identification, a properties section for application-specific, provider-specific, and optional header fields, and a body section that contains the content of the message. The content of a message may include text, data packets, objects, or other information to be communicated between nodes.
Several different types of messaging techniques may be used for communicating between nodes including point-to-point and publish-and-subscribe. As seen in FIG. 1a, in a point-to-point (or queue) messaging system (generally a one-to-one delivery), a message 105 may be sent by a message producer 101 to a message consumer 103 through a message queue 110 (also known as a virtual channel). For example, a message producer 101 may send a message 105 to a message queue 110 for a message consumer 103. The message consumer 103 receives and processes the message 105 from the message queue 110.
As seen in FIG. 1b, in a publish-and-subscribe (or topic) messaging system (generally a one-to-many broadcast), the message producer 101 may be a publisher for a topic 123 (also known as a virtual channel) that sends a message 115 to several message consumers (known as subscribers) that have subscribed to the topic 123. For example, the message producer 101 may send a message 115 to a topic 123. Several nodes, such as the message consumer 103 and the second message consumer 121 may subscribe (e.g., request that messages of a certain type be sent to the node when available) to the topic 123. The topic 123 may deliver the message 115 to the message consumer 103 and the second message consumer 121. Message consumers not subscribed to the topic do not receive the message.
To facilitate sending and receiving messages, nodes typically connect to a messaging agent or middleware for implementing message queues and/or topics. One example of a messaging agent may be implemented according to the Java Messaging Service (JMS). Messages may be sent and received asynchronously, and nodes sending and receiving messages may not need to know anything about the nodes they are communicating with. This allows more freedom between nodes and makes it easier to design interfaces between nodes and easier to distribute applications and application components across a network.
Some network environments may utilize clustered systems (e.g., clustered message driven bean (MDB) containers). A clustered system may include nodes participating in a messaging system. A cluster may include multiple nodes that should behave as a single node in the messaging system. For example, a node may be a “bean” (e.g., an application component) clustered with other message driven beans. Message driven beans may use JMS to access message-oriented middleware (MOM) for messaging with other nodes (e.g., other MDBs or other message producers/consumers) in a network. A cluster of nodes may need to appear as a single producer/consumer for typical messaging systems. For example, confusion may result if two nodes in a cluster receive and process a topic message for which the cluster should appear to have subscribed to as a single entity. Also, a cluster may not be able to support different message-oriented middleware products.